App Service (1 / 97): You have existing App Service web app MyAppService
in West US running on Basic
plan. You want to add support for staging environments and move it to North Central US region region. What steps you need to take?
Answer:
You cannot move web app from one region to other. Also Basic
plan does not support staging environments. The app needs to be cloned into a new region.
# Create new resource group with location 'North Central US'
New-AzResourceGroup -Name DestinationAzureResourceGroup -Location "North Central US"
# Create new 'Standard' App Service plan for that group (and set staging environments leter)
New-AzAppServicePlan -Location "North Central US" -ResourceGroupName DestinationAzureResourceGroup -Name DestinationAppServicePlan -Tier Standard
# Clone `MyAppService` into new web app and place it in the new App Service plan
$srcapp = Get-AzWebApp -ResourceGroupName SourceAzureResourceGroup -Name MyAppService
$destapp = New-AzWebApp -ResourceGroupName DestinationAzureResourceGroup -Name MyAppService2 -Location "North Central US" -AppServicePlan DestinationAppServicePlan -SourceWebApp $srcapp